<template>
  <div class="title flex">
    <div class="title-left">
      <h2 class="mb-3 text-2xl font-bold xl:text-3xl enter-x xl:text-left">
        {{ getFormTitle }}
      </h2>
      <div class="remark">
        {{ t('sys.login.signInFormRemark') }}
      </div>
    </div>
    <div>
      <!-- <img src="../../../../assets/images/login-logo.png" width="72" height="72" alt="" srcset="" /> -->
      <img src="../../../../assets/images/header.png" width="72" height="72" alt="" srcset="" />

    </div>
  </div>
</template>
<script lang="ts" setup>
  import { computed, unref } from 'vue';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { LoginStateEnum, useLoginState } from './useLogin';


  const { t } = useI18n();

  const { getLoginState } = useLoginState();

  const getFormTitle = computed(() => {
    const titleObj = {
      [LoginStateEnum.RESET_PASSWORD]: t('sys.login.forgetFormTitle'),
      [LoginStateEnum.LOGIN]: t('sys.login.signInFormTitle'),
      [LoginStateEnum.REGISTER]: t('sys.login.signUpFormTitle'),
      [LoginStateEnum.MOBILE]: t('sys.login.mobileSignInFormTitle'),
      [LoginStateEnum.QR_CODE]: t('sys.login.qrSignInFormTitle'),
    };
    return titleObj[unref(getLoginState)];
  });
</script>

<style lang="less" scoped>
  .title {
    justify-content: space-between;
    align-items: center;

    .remark {
      color: #c7c8d4;
    }
  }
</style>
